package com.ruoyi.workstation.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.workstation.mapper.UserLogMapper;
import com.ruoyi.workstation.domain.UserLog;
import com.ruoyi.workstation.service.IUserLogService;
import com.ruoyi.common.core.text.Convert;

/**
 * 客户日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-13
 */
@Service
public class UserLogServiceImpl implements IUserLogService 
{
    @Autowired
    private UserLogMapper userLogMapper;

    /**
     * 查询客户日志
     * 
     * @param id 客户日志主键
     * @return 客户日志
     */
    @Override
    public UserLog selectUserLogById(Long id)
    {
        return userLogMapper.selectUserLogById(id);
    }

    /**
     * 查询客户日志列表
     * 
     * @param userLog 客户日志
     * @return 客户日志
     */
    @Override
    public List<UserLog> selectUserLogList(UserLog userLog)
    {
        return userLogMapper.selectUserLogList(userLog);
    }

    /**
     * 新增客户日志
     * 
     * @param userLog 客户日志
     * @return 结果
     */
    @Override
    public int insertUserLog(UserLog userLog)
    {
        userLog.setCreateTime(DateUtils.getNowDate());
        return userLogMapper.insertUserLog(userLog);
    }

    /**
     * 修改客户日志
     * 
     * @param userLog 客户日志
     * @return 结果
     */
    @Override
    public int updateUserLog(UserLog userLog)
    {
        return userLogMapper.updateUserLog(userLog);
    }

    /**
     * 批量删除客户日志
     * 
     * @param ids 需要删除的客户日志主键
     * @return 结果
     */
    @Override
    public int deleteUserLogByIds(String ids)
    {
        return userLogMapper.deleteUserLogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除客户日志信息
     * 
     * @param id 客户日志主键
     * @return 结果
     */
    @Override
    public int deleteUserLogById(Long id)
    {
        return userLogMapper.deleteUserLogById(id);
    }
}
